<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--
	作者：offline
	时间：2017-04-13
	描述：修改密码
-->
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.form_text{  
  				font-size: 20px;
				color: white;
			}
			.form_input{
				width: 200px;
         		border: 1px solid rgba(255, 255, 255, 1);
  				border-radius: 3px;
				padding: 10px 15px;
				text-align: center;
				font-size: 18px;
			}
			.forms{
		 		background-color: #53E3A6;
		 		border: 0;
		  		padding: 10px 15px;
		  		color: white;
		  		border-radius: 3px;
		  		width: 110px;
		  		cursor: pointer;
		  		font-size: 18px;
		  		text-align: center;
		  		position:absolute;
		  		left: 150px;
		  		top: 250px;
			}
</style>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function(){
	$(".forms").click(function(){
		var id = $(".id").val();
		oldPasswork = $("#oldpwd").val();
		newPasswork = $("#newpwd").val();
		surePasswork = $("#surepwd").val();
		$.ajax({
		    url : "resetPassword",   
		    data:{"id":id,"oldPasswork":oldPasswork,"newPasswork":newPasswork,"surePasswork":surePasswork},
		    type : "post",
		    success : function (data) {
		         alert(data);   //data即为后台返回的数据
		    }
		});
	});
});
</script>
	</head>
	<body>
		<form class="form_text" action="resetPassword" method="post">
		<input type="hidden" class="id" name="id" value="${user.id }">
		<a>旧密码：&nbsp;&nbsp;&nbsp;</a>
		<input id="oldpwd" class="form_input" type="password" name="oldPasswork" placeholder="旧密码">
		<p></p>
		<br />
		<a>新密码：&nbsp;&nbsp;&nbsp;</a>
		<input id="newpwd" class="form_input" type="password" name="newPasswork" placeholder="新密码">
		<p></p>
		<br />
		<a>再次确认：</a>
		<input id="surepwd" class="form_input" type="password" name="surePasswork" placeholder="再次确认">
		<button type="button" id="psd_sure-button" class="forms">提交</button>
		</form>
	</body>
</html>